<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane v-if="checkPermi(['workflow:budget:make'])"  label="预算生成管理" name="second">
        <budgetFormulation v-if="activeName == 'second'"></budgetFormulation>
      </el-tab-pane>
      <el-tab-pane label="待办任务" name="first">
        <budgetTodo v-if="activeName == 'first'"></budgetTodo>
      </el-tab-pane >
      <el-tab-pane label="已办任务" name="third">
        <budget-finished v-if="activeName == 'third'"></budget-finished>
      </el-tab-pane>
      <el-tab-pane label="预算执行管理" name="fourth">
        <budgetExecution v-if="activeName == 'fourth'"></budgetExecution>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import budgetExecution from './components/budgetExecution.vue';
import BudgetFinished from './components/budgetFinished.vue';
import BudgetFormulation from './components/budgetFormulation.vue';
import BudgetTodo from './components/budgetTodo.vue';

export default {
  components: { budgetExecution, BudgetFormulation, BudgetTodo, BudgetFinished },
  name:'Budget',
  data() {
    return {
      activeName: 'first'
    };
    },
    mounted() {
        // 获取按钮元素数组中第一个.click()
  },
  methods: {
    
    handleClick(tab, event) {
      this.activeName = tab.name
    }
  }
};
</script>

<style lang="scss" scoped>
</style>
